﻿<Window x:Class="SketlonBackOffice.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="MainWindow" Height="516" Width="891">
    <Grid Name="myGrid">
        <Grid HorizontalAlignment="Left" Height="485" VerticalAlignment="Top" Width="891">
            <Grid HorizontalAlignment="Left" Height="485" VerticalAlignment="Top" Width="270">
                <ListBox Name="CaptureBox" HorizontalAlignment="Left" Height="162" VerticalAlignment="Top" Width="270" >
                </ListBox>
                <Label Content="0" Name="RepeatCount" HorizontalAlignment="Left" Margin="10,217,0,0" VerticalAlignment="Top" Width="218"/>
                <Label Content="Set repeat to selected frames" HorizontalAlignment="Left" Margin="10,167,0,0" VerticalAlignment="Top" Width="218"/>

            </Grid>
            <Canvas  x:Name="SketlonCanvas" Height="485"  VerticalAlignment="Top" Margin="270,0,0,0" HorizontalAlignment="Left" Width="615">
                <Canvas.Background>
                    <VisualBrush TileMode="Tile" Stretch="Fill" Viewport="0 0 10 10" ViewportUnits="Absolute" ViewboxUnits="Absolute" >
                        <VisualBrush.Visual>
                            <Grid>
                                <Rectangle Width="1" Height="0.03" Fill="Gray" HorizontalAlignment="Left" VerticalAlignment="Top" />
                                <Rectangle Height="1" Width="0.03" Fill="Gray" HorizontalAlignment="Left" VerticalAlignment="Top" />
                            </Grid>
                        </VisualBrush.Visual>
                    </VisualBrush>
                </Canvas.Background>
                <Button Height="14" CommandParameter="0" x:Name="HeadJoint" ToolTip="Head Joint" Background="Black" Canvas.Left="310" PreviewMouseLeftButtonUp="Head_MouseLeftButtonUp" PreviewMouseMove="Head_MouseMove" PreviewMouseLeftButtonDown="Head_MouseLeftButtonDown" Canvas.Top="35" Width="14"/>
                <Button Height="14" x:Name="ShoulderCenter" ToolTip="Shoulder Center" Background="Black" Canvas.Left="310" Canvas.Top="118" Width="14" />
                <Button Height="14" CommandParameter="1" x:Name="ElbowLeft" ToolTip="Elbow Left" Background="Black" Canvas.Left="216" PreviewMouseLeftButtonUp="Head_MouseLeftButtonUp" PreviewMouseMove="Head_MouseMove" PreviewMouseLeftButtonDown="Head_MouseLeftButtonDown" Canvas.Top="155" Width="14"/>
                <Button Height="14" CommandParameter="2" x:Name="ElbowRight" ToolTip="Elbow Right" Background="Black" Canvas.Left="401" PreviewMouseLeftButtonUp="Head_MouseLeftButtonUp" PreviewMouseMove="Head_MouseMove" PreviewMouseLeftButtonDown="Head_MouseLeftButtonDown" Canvas.Top="155" Width="14"/>
                <Button Height="14" CommandParameter="3" x:Name="HandLeft" ToolTip="Hand Left" Background="Black" Canvas.Left="120" PreviewMouseLeftButtonUp="Head_MouseLeftButtonUp" PreviewMouseMove="Head_MouseMove" PreviewMouseLeftButtonDown="Head_MouseLeftButtonDown" Canvas.Top="182" Width="14"/>
                <Button Height="14" CommandParameter="4" x:Name ="HandRight" ToolTip="Hand Right" Background="Black" Canvas.Left="497" PreviewMouseLeftButtonUp="Head_MouseLeftButtonUp" PreviewMouseMove="Head_MouseMove" PreviewMouseLeftButtonDown="Head_MouseLeftButtonDown" Canvas.Top="182" Width="14"/>
                <Button Height="14"  CommandParameter="5" x:Name="BackCenter" ToolTip="Shoulder Center" Background="Black" Canvas.Left="310" Canvas.Top="278" Width="14" />
                <Button Height="14" CommandParameter="6" x:Name="KneeLeft" ToolTip="Elbow Left" Background="Black" Canvas.Left="294" PreviewMouseLeftButtonUp="Head_MouseLeftButtonUp" PreviewMouseMove="Head_MouseMove" PreviewMouseLeftButtonDown="Head_MouseLeftButtonDown" Canvas.Top="360" Width="14"/>
                <Button Height="14" CommandParameter="7" x:Name="KneeRight" ToolTip="Elbow Right" Background="Black" Canvas.Left="328" PreviewMouseLeftButtonUp="Head_MouseLeftButtonUp" PreviewMouseMove="Head_MouseMove" PreviewMouseLeftButtonDown="Head_MouseLeftButtonDown" Canvas.Top="360" Width="14"/>
                <Button Height="14" CommandParameter="8" x:Name="FootLeft" ToolTip="Hand Left" Background="Black" Canvas.Left="281" PreviewMouseLeftButtonUp="Head_MouseLeftButtonUp" PreviewMouseMove="Head_MouseMove" PreviewMouseLeftButtonDown="Head_MouseLeftButtonDown" Canvas.Top="423" Width="14"/>
                <Button Height="14" CommandParameter="9" x:Name="FootRight" ToolTip="Hand Right" Background="Black" Canvas.Left="338" PreviewMouseLeftButtonUp="Head_MouseLeftButtonUp" PreviewMouseMove="Head_MouseMove" PreviewMouseLeftButtonDown="Head_MouseLeftButtonDown" Canvas.Top="423" Width="14"/>
                <Slider Canvas.Left="-264" Canvas.Top="196"  Minimum="0"   TickPlacement="BottomRight" ValueChanged="Slider_ValueChanged_1"      Maximum="20"        IsSnapToTickEnabled="True"        TickFrequency="2" Width="239"/>
                <Button Content="Set repeat" HorizontalAlignment="Left" VerticalAlignment="Top" Width="90" Click="SetRepeatClick" Canvas.Left="-264" Canvas.Top="244"/>

            </Canvas>
            <Button Content="Capture Frame" HorizontalAlignment="Left" Margin="175,455,0,0" VerticalAlignment="Top" Width="90" Click="CaptureClick"/>
            <Button Content="Save XML" HorizontalAlignment="Left" Margin="10,455,0,0" VerticalAlignment="Top" Width="90" Click="SaveXML"/>
            <Button Content="Play Stream" HorizontalAlignment="Left" Margin="10,420,0,0" VerticalAlignment="Top" Width="90" Click="PlayStream"/>
            <Button Content="Clean Stream" HorizontalAlignment="Left" Margin="175,420,0,0" VerticalAlignment="Top" Width="90" Click="CleanStream"/>
            <Button Content="Clean repeat" HorizontalAlignment="Left" Margin="175,244,0,0" VerticalAlignment="Top" Width="90" Click="CleanRepeat"/>
        </Grid>

    </Grid>
</Window>
